package com.ruoyi.system.monitortask.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.monitortask.domain.MonitorTask;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * 账号监控任务表(monitor_task)表数据库访问层
 *
 * @author zyy
 * @date 2024-06-21 15:19:20
 */
public interface MonitorTaskMapper extends BaseMapper<MonitorTask> {

    @InterceptorIgnore(tenantLine = "1")
    List<Map<String, Object>> getTenantGoodsMonitorTask();

    @InterceptorIgnore(tenantLine = "1")
    @Update("update monitor_task set last_date=CURDATE() where id= #{id}")
    int updateMonitorTask(@Param("id") Long id);

    @InterceptorIgnore(tenantLine = "1")
    @Update("update monitor_task set state=2 where create_id= #{createId}")
    int updateTenantGoodsMonitorTask(@Param("createId") Long createId);

}

